<?php
// <editor-fold defaultstate="collapsed" desc="Config Site">
define('DEVELOPMENT_ENVIRONMENT', true);
date_default_timezone_set('Asia/Ho_Chi_Minh');
setlocale(LC_ALL, 'en_US.utf-8');

$s_WebTitle        = 'ĐTNTT - GX Nam Hòa';
$s_Domain          = 'nh.denybuddy.com';
$s_Base_URL        = 'http://nh.denybuddy.com/';
$s_File_System_URL = 'http://localhost/file/';
$i_Page_Size       = 10;
// </editor-fold>

// <editor-fold defaultstate="collapsed" desc="Define Directory/Library">
$s_User_Path     = 'file/user/';
$s_Assets_Path   = 'assets/';
$s_Lib_Path      = __DIR__ . '/' . 'lib/';
$s_File_Path     = __DIR__ . '/' . 'file/';
$s_TempPath      = $s_File_Path . 'tmp/';
$s_Cache_Path    = $s_File_Path . 'cache/';
$s_Log_Path      = $s_File_Path . 'log/';

if ( (!is_dir($s_File_Path  ) && !@mkdir($s_File_Path      )) ||
     (!is_dir($s_TempPath   ) && !@mkdir($s_TempPath       )) ||
     (!is_dir($s_Cache_Path ) && !@mkdir($s_Cache_Path     )) ||
     (!is_dir($s_Log_Path   ) && !@mkdir($s_Log_Path       )) ||
     (!is_dir($s_User_Path  ) && !@mkdir($s_User_Path )) ) { }

set_include_path($s_Lib_Path);
// </editor-fold>

$a_TrangThai_TaiKhoan = array (
    'DELETED' => 'Đã Xóa',
);

$a_GoiTinh = array(
    'NAM' => 'Nam',
    'NU'  => 'Nữ',
);

$a_Loai_ChuyenCan = array(
    'LE'    => 'Đi Lễ',
    'HOC'   => 'Học GL',
);

$v_tmp_start = 'Y-08-01';
$v_tmp_end   = 'Y-07-31';

if (strtotime( date('Y-m-d') ) < strtotime( date($v_tmp_start) )) {
    $v_tmp_start = date($v_tmp_start, strtotime('-1 year'));
    $v_tmp_end   = date($v_tmp_end);
}
else {
    $v_tmp_start = date($v_tmp_start);
    $v_tmp_end   = date($v_tmp_end, strtotime('+1 year'));
}

$a_KhoaHoc_Info = array (
    'start'      => $v_tmp_start,
    'start_year' => date('Y', strtotime($v_tmp_start)),
    'end'        => $v_tmp_end,
    'end_year'   => date('Y', strtotime($v_tmp_end)),
    'name'       => date('Y', strtotime($v_tmp_start)) . "-" . date('Y', strtotime($v_tmp_end)),
);

// <editor-fold defaultstate="collapsed" desc="Load Core Library">
include 'lib_mysqli.php';
include 'lib_db_namhoa.php';
include 'lib_conn_namhoa.php';

$db_conn = $db_conn_namhoa;

include 'lib_func.php';
include 'lib_vars.php';
include 'lib_user.php';
include 'lib_passport.php';
// </editor-fold>
?>
